package com.eling.elcms.travel.service;

import com.eling.elcms.core.dao.hibernate.search.SearchCondition;
import com.eling.elcms.core.service.IGenericManager;
import com.eling.elcms.travel.model.Mail;
import com.eling.elcms.travel.model.TravelContract;
import com.eling.elcms.travel.model.view.MailRegisterView;
import com.eling.elcms.travel.model.view.PlanMailView;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface IMailManager extends IGenericManager<Mail, Long>{
	
	/**
	 * 根据年份过滤计划
	 * @param year
	 * @return
	 */
	List<PlanMailView> queryPlan(String year);
	
    /**
     * 查询会员邮寄信息
     * @param cond
     * @param pkPlan
     * @return
     */
	List<MailRegisterView> queryMail(Mail cond,Long pkPlan,Long addressId);
	
	/**
	 * 根据邮寄状态查询邮寄信息
	 * @param cond
	 * @param status
	 * @param pkPlan
	 * @return
	 */
	List<MailRegisterView> queryAll(Mail cond, TravelContract travelContract,Boolean flag);
	
	/**
	 * 根据过滤条件批量操作
	 * @param cond
	 * @param status
	 * @param statusSave
	 * @param pkPlan
	 * @param addressId
	 */
	List<Mail> saveMailRegister(Mail cond,Long pkPlan,Long addressId);

	List<MailRegisterView> searchMail(SearchCondition sc,Mail cond);

	void toExcel(HttpServletResponse resp, String status, Long pkPlan,
			Long pkProduct);

}
